package com.deepinjava.dbbmlite;


import java.sql.Time;
import java.sql.Timestamp;
import java.util.List;

public class Benchresult {

  private long id;
  private String profile;
  private String dialect;
  private String dbproduct;
  private long totalmark;
  private long totalrow;
  private long threatcount;
  private java.sql.Timestamp benchtime;
  private String driverinfo;
  private String dbversion;
  private String driverversion;
  private String recordbody;
  private String comm;

  private List<BenchresultItem> items;


  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }


  public String getProfile() {
    return profile;
  }

  public void setProfile(String profile) {
    this.profile = profile;
  }


  public String getDialect() {
    return dialect;
  }

  public void setDialect(String dialect) {
    this.dialect = dialect;
  }


  public String getDbproduct() {
    return dbproduct;
  }

  public void setDbproduct(String dbproduct) {
    this.dbproduct = dbproduct;
  }


  public long getTotalmark() {
    return totalmark;
  }

  public void setTotalmark(long totalmark) {
    this.totalmark = totalmark;
  }


  public long getTotalrow() {
    return totalrow;
  }

  public void setTotalrow(long totalrow) {
    this.totalrow = totalrow;
  }


  public long getThreatcount() {
    return threatcount;
  }

  public void setThreatcount(long threatcount) {
    this.threatcount = threatcount;
  }


  public java.sql.Timestamp getBenchtime() {
    return benchtime;
  }

  public void setBenchtime(java.sql.Timestamp benchtime) {
    this.benchtime = benchtime;
  }


  public String getDriverinfo() {
    return driverinfo;
  }

  public void setDriverinfo(String driverinfo) {
    this.driverinfo = driverinfo;
  }


  public String getDbversion() {
    return dbversion;
  }

  public void setDbversion(String dbversion) {
    this.dbversion = dbversion;
  }


  public String getDriverversion() {
    return driverversion;
  }

  public void setDriverversion(String driverversion) {
    this.driverversion = driverversion;
  }


  public String getRecordbody() {
    return recordbody;
  }

  public void setRecordbody(String recordbody) {
    this.recordbody = recordbody;
  }


  public String getComm() {
    return comm;
  }

  public void setComm(String comm) {
    this.comm = comm;
  }

  public List<BenchresultItem> getItems() {
    return items;
  }

  public void setItems(List<BenchresultItem> items) {
    this.items = items;
  }

  @Override
  public String toString() {
    return "Benchresult{" +
            "profile='" + profile + '\'' +
            ", dialect='" + dialect + '\'' +
            ", dbproduct='" + dbproduct + '\'' +
            ", totalmark=" + totalmark +
            ", totalrow=" + totalrow +
            ", threatcount=" + threatcount +
            ", driverinfo='" + driverinfo + '\'' +
            ", dbversion='" + dbversion + '\'' +
            ", driverversion='" + driverversion + '\'' +
            ", recordbody='" + recordbody + '\'' +
            ", comm='" + comm + '\'' +
            '}';
  }

    public String toJson(){
      return "{" +
              "\"profile\":\"" + profile + '\"' +
              ", \"dialect\":\"" + dialect + '\"' +
              ",\"dbproduct\":\"" + dbproduct + '\"' +
              ",\"totalmark\":" + totalmark +
              ",\"totalrow\":" + totalrow +
              ",\"threatcount\":" + threatcount +
              ",\"driverinfo\":\"" + driverinfo + '\"' +
              ",\"dbversion\":\"" + dbversion + '\"' +
              ",\"driverversion\":\"" + driverversion + '\"' +
              ",\"recordbody\":\"" + recordbody + '\"' +
              ",\"comm\":"+ ( comm == null ? comm : "\"" + comm + '\"') +
              '}';
  }
}